import request from '@/utils/request'

export function getRolesList (parameter) {
  return request({
    url: '/common/listRole',
    method: 'post',
    data: parameter
  })
}
export function getAccountList (parameter) {
  return request({
    url: '/boss/approve/approveUser',
    method: 'get',
    params: parameter
  })
}
export function addApproval (parameter) {
  return request({
    url: '/v2/boss/approve/add',
    method: 'post',
    data: parameter
  })
}
export function insertLatestFlowInfoSnapshot (parameter) {
  return request({
    url: '/v2/boss/approve/insertLatestFlowInfoSnapshot',
    method: 'post',
    data: parameter
  })
}
export function updateApproval (parameter) {
  return request({
    url: '/v2/boss/approve/update',
    method: 'post',
    data: parameter
  })
}
export function getApprovalDetail (parameter) {
  return request({
    url: '/v2/boss/approve/detail',
    method: 'get',
    params: parameter
  })
}
export function getUnusedResearchList (parameter) {
  return request({
    url: '/v2/boss/approve/getUnusedResearchList',
    method: 'get',
    params: parameter
  })
}
export function selectFlowList (parameter) {
  return request({
    url: '/v2/boss/approve/selectFlowList',
    method: 'get',
    params: parameter
  })
}
export function deleteById (parameter) {
  return request({
    url: '/v2/boss/approve/deleteById',
    method: 'post',
    data: parameter
  })
}
export function getFlowInfoById (parameter) {
  return request({
    url: '/v2/boss/approve/getFlowInfoById',
    method: 'get',
    params: parameter
  })
}
